﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace ProjetoComperio.DataLayer.Entities
{
    public class Contribution
    {
        [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorMessages))]
        public virtual int ContributionID { get; set; }

        [DisplayName("Fonte")]
        public virtual string SourceInfo { get; set; }

        [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorMessages))]
        [DisplayName("Data registro")]
        public virtual DateTime RegisterDate { get; set; }

        [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorMessages))]
        [DisplayName("Titulo")]
        public virtual string Title { get; set; }

        [DisplayName("Descrição")]        
        public virtual string Description { get; set; }

        [DefaultValue(false)]
        public virtual Boolean IsActive { get; set; } 

        [Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorMessages))]
        public virtual Int32 AcademicPersonID { get; set; }
        public virtual AcademicPerson AcademicPerson { get; set; }

        public virtual ICollection<Context> Contexts { get; set; }

        public virtual ICollection<KnowledgeArea> KnowledgeAreas { get; set; }

        public virtual ICollection<Subject> Subjects { get; set; }

        public virtual ICollection<AcademicPerson> AcademicPeople { get; set; }

        public virtual ICollection<ContributionItem> ContributionItems { get; set; }

    }
}
